<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Default.aspx.cs" Inherits="testGMap._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head runat="server">
    <title>Untitled Page</title>

    <script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAXg-1e7LbaB0NNB4KY0h0-BQWFt-7OBZKMPMlsVYvuUdvLO58RBSi6mMmr-RK5Y90BBnpyvt7UFoIfA"></script>

    <script type="text/javascript"> google.load("maps", "2.x"); </script>

    <script type="text/javascript"> 
// Call this function when the page has been loaded 
    function initialize() { 
        var map = new google.maps.Map2(document.getElementById("map")); 
        map.setCenter(new google.maps.LatLng(37.4419, -122.1419), 13); 
    } 
    google.setOnLoadCallback(initialize); 

    function drawGmap() { 
        var dLat = document.getElementById("hidLatitude").value;
        var dLong = document.getElementById("hidLongitude").value;
        var map = new google.maps.Map2(document.getElementById("map")); 
        map.setCenter(new google.maps.LatLng(dLat, dLong), 10); 
        
    } 
    
    function displaymessage()
    {
        alert("Hello World!");
    }
    </script>

</head>
<body onunload="GUnload()">
    GMap in <a href="testGoogMap.html">JS </a>
    <form id="form1" runat="server">
        &nbsp;<div id="map1">
        </div>
        <input type="button" value="draw new GMap" onclick="drawGmap()" />
        Pressing this calls the JS draw function that uses Lat, Long that is printed here via 
        ASP.Net
        <br />
        <input type="button" value="JS Pop-up" onclick="displaymessage()" />
        Displays a pop-up &nbsp;&nbsp;<br />
        <br />
        <br />
        Hidden Latitude and Longitude written to here by ASP.Net
        <input id="hidLatitude" runat="server" type="hidden" value="0000" />
        <input id="hidLongitude" runat="server" type="hidden" value="0000" /><br />
        <br />
    </form>
    <hr />
    <br />
    Map Display<br />
    <div id="map" style="width: 400px; height: 400px" visible="blah">
    </div>
</body>
</html>
